(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxRelTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
add0(S(x), x2) → +(S(0), add0(x2, x))
add0(0, x2) → x2
The (relative) TRS S consists of the following rules:
+(x, S(0)) → S(x)
+(S(0), y) → S(y)
Rewrite Strategy: INNERMOST
(1) RelTrsToTrsProof (UPPER BOUND(ID) transformation)
transformed relative TRS to TRS
(2) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
add0(S(x), x2) → +(S(0), add0(x2, x))
add0(0, x2) → x2
+(x, S(0)) → S(x)
+(S(0), y) → S(y)
Rewrite Strategy: INNERMOST
(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)
A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.
The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2]
transitions:
S0(0) → 0
00() → 0
add00(0, 0) → 1
+0(0, 0) → 2
01() → 4
S1(4) → 3
add01(0, 0) → 5
+1(3, 5) → 1
S1(0) → 2
+1(3, 5) → 5
S2(5) → 1
S1(3) → 1
S1(3) → 5
S2(5) → 5
0 → 1
0 → 5
(4) BOUNDS(1, n^1)
(5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:
ADD0(S(z0), z1) → c(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
ADD0(0, z0) → c1
+'(z0, S(0)) → c2
+'(S(0), z0) → c3
S tuples:
ADD0(S(z0), z1) → c(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
ADD0(0, z0) → c1
+'(z0, S(0)) → c2
+'(S(0), z0) → c3
K tuples:none
Defined Rule Symbols:
add0, +
Defined Pair Symbols:
ADD0, +'
Compound Symbols:
c, c1, c2, c3
(7) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing nodes:
ADD0(0, z0) → c1
+'(z0, S(0)) → c2
+'(S(0), z0) → c3
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:
ADD0(S(z0), z1) → c(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
S tuples:
ADD0(S(z0), z1) → c(+'(S(0), add0(z1, z0)), ADD0(z1, z0))
K tuples:none
Defined Rule Symbols:
add0, +
Defined Pair Symbols:
ADD0
Compound Symbols:
c
(9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing tuple parts
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
S tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
K tuples:none
Defined Rule Symbols:
add0, +
Defined Pair Symbols:
ADD0
Compound Symbols:
c
(11) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
add0(S(z0), z1) → +(S(0), add0(z1, z0))
add0(0, z0) → z0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
S tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
ADD0
Compound Symbols:
c
(13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
ADD0(S(z0), z1) → c(ADD0(z1, z0))
We considered the (Usable) Rules:none
And the Tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(ADD0(x1, x2)) = x1 + x2
POL(S(x1)) = [1] + x1
POL(c(x1)) = x1
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
S tuples:none
K tuples:
ADD0(S(z0), z1) → c(ADD0(z1, z0))
Defined Rule Symbols:none
Defined Pair Symbols:
ADD0
Compound Symbols:
c
(15) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(16) BOUNDS(1, 1)